package com.ruicar.afs.cloud.product.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruicar.afs.cloud.common.core.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;

/**
 * @author changyu.gui
 * @version 1.0
 * @date 2020/5/27 15:24
 */
@Data
@NoArgsConstructor
@TableName("product_implemente_plan")
@ApiModel(value = "产品上线方案数据表")
public class ProductImplementePlan extends BaseEntity<ProductImplementePlan> {

    @ApiModelProperty(value = "产品方案ID")
    @NotBlank(message = "产品方案ID不能为空")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long productPlanId;

    @ApiModelProperty(value = "产品上线ID")
    @NotBlank(message = "产品上线ID不能为空")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long productImplementeId;

    public ProductImplementePlan(long productPlanId, long productImplementeId, String status) {
        this.setProductPlanId(productPlanId);
        this.setProductImplementeId(productImplementeId);
    }
}
